package com.hangsu.train.components.enums;

/**
 * @author lyy
 * @Date 2024/5/3
 */
public enum TaskEnum {
    CLOSE(0,"关闭"),
    START(1,"运行中"),
    ;

    TaskEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    private Integer code;
    private String name;

    public static TaskEnum lookup(Integer code){
        for(TaskEnum practiceStatus : TaskEnum.values()){
            if(practiceStatus.code == code){
                return practiceStatus;
            }
        }
        return null;
    }

}